#include <iostream>
#include <cctype>
using namespace std;

int main()
{
    string str;
    cin>>str;

    string ret;
    string tmp;
    for(int i=0;i<str.size();i++)
    {
        if(str[i]>='0' && str[i]<='9')
            tmp.push_back(str[i]);
        else{
            if(tmp.size()>ret.size())
            {
                ret=tmp;
            }
            tmp.clear();
        }
    }
    if(tmp.size()>ret.size())
    {
        ret=tmp;
    }
    cout<<ret<<endl;
    return 0;
}
